package com.winning.ds.role.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import java.io.Serializable;

/** @Author: nxs@winning.com.cn @Description: 角色实体类 @Date: 2018-07-03 14:45:35 */
@TableName("sys_czjs")
@Data
public class SysCzjsEntity implements Serializable {

  private static final long serialVersionUID = 1L;
  // 机构编码
  private String jgbm;
  // 角色编码
  private String jsdm;
  // 角色名称
  @NotBlank(message = "角色名称不能为空")
  private String jsmc;
  // 角色描述
  private String jsms;
  // 创建时间
  private String cjsj;
  // 角色编码
  private String jsbm;
  // 备注
  private String bz;

  @Override
  public boolean equals(Object that) {
    if (this == that) {
      return true;
    }
    if (that == null) {
      return false;
    }
    if (getClass() != that.getClass()) {
      return false;
    }
    SysCzjsEntity other = (SysCzjsEntity) that;
    return (this.getJgbm() == null
            ? other.getJgbm() == null
            : this.getJgbm().equals(other.getJgbm()))
        && (this.getJsdm() == null
            ? other.getJsdm() == null
            : this.getJsdm().equals(other.getJsdm()))
        && (this.getJsmc() == null
            ? other.getJsmc() == null
            : this.getJsmc().equals(other.getJsmc()))
        && (this.getJsms() == null
            ? other.getJsms() == null
            : this.getJsms().equals(other.getJsms()))
        && (this.getCjsj() == null
            ? other.getCjsj() == null
            : this.getCjsj().equals(other.getCjsj()))
        && (this.getJsbm() == null
            ? other.getJsbm() == null
            : this.getJsbm().equals(other.getJsbm()))
        && (this.getBz() == null ? other.getBz() == null : this.getBz().equals(other.getBz()));
  }

  @Override
  public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + ((getJgbm() == null) ? 0 : getJgbm().hashCode());
    result = prime * result + ((getJsdm() == null) ? 0 : getJsdm().hashCode());
    result = prime * result + ((getJsmc() == null) ? 0 : getJsmc().hashCode());
    result = prime * result + ((getJsms() == null) ? 0 : getJsms().hashCode());
    result = prime * result + ((getCjsj() == null) ? 0 : getCjsj().hashCode());
    result = prime * result + ((getJsbm() == null) ? 0 : getJsbm().hashCode());
    result = prime * result + ((getBz() == null) ? 0 : getBz().hashCode());
    return result;
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append(getClass().getSimpleName());
    sb.append(" [");
    sb.append("Hash = ").append(hashCode());
    sb.append(", jsmc=").append(jsmc);
    sb.append(", jsms=").append(jsms);
    sb.append(", cjsj=").append(cjsj);
    sb.append(", jsbm=").append(jsbm);
    sb.append(", bz=").append(bz);
    sb.append(", serialVersionUID=").append(serialVersionUID);
    sb.append("]");
    return sb.toString();
  }
}
